package com.example.springstudy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springstudy.entity.Role;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Set;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {
    List<Role> getRoles(Long userId);

    void addUserRole(Long userId, Set<Integer> roleIds);

    void deleteUserRole(Long userId);

    void deleteRoleMenus(Integer roleId);

    void saveRoleMenus(Integer roleId, List<Integer> menuIds);
}
